package com.itheima.web.controller;

import cn.hutool.captcha.LineCaptcha;
import com.itheima.domain.db.TuBiao;
import com.itheima.domain.vo.AnalysisSummaryVo;
import com.itheima.web.manager.AnalysisManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@RestController
public class AnalysisController {

    @Autowired
    private AnalysisManager analysisManager;


    @GetMapping("/dashboard/summary")
    public AnalysisSummaryVo summary() throws IOException {

        return analysisManager.summary();
    }

    //图表显示
    @GetMapping("/dashboard/users")
    public TuBiao tongji(Long sd, Long ed, String type){
        return analysisManager.tongji(sd,ed,type);

    }
}
